<?php
namespace app\admin\Validate;
use think\Validate;

class Cate extends Validate{
    protected $rule=[
        'name'=>'require|max:8',
        'sort'=>'require|number'
    ];
    protected $message=[
        'name.require'=>'请填写名称',
        'name.max'=>'名称最长不得超过8个汉字',
        'sort.require'=>'请填写排序',
        'sort.number'=>'排序必须为数字'
    ];
}